typedef struct _iobuf FILE;

extern FILE (*_imp___iob)[];
#define _iob (*_imp___iob)

#define EXPORT __declspec(dllexport)

EXPORT extern FILE* __cdecl __iob_func(void);

FILE* __cdecl __iob_func(void)
{
	return _iob;
}


typedef long time_t; // !ARCH

int __cdecl ftell(void* str);
int __cdecl fseek(void* str, int offset, int whence);
time_t __cdecl time(time_t* _Time);
time_t __cdecl mktime(void* tb);
void* __cdecl localtime(time_t* _Time);
void* __cdecl gmtime(time_t* timp);
double __cdecl difftime(time_t b, time_t a);

EXPORT __int64 __cdecl _ftelli64(void* str)
{
	return ftell(str);
}

EXPORT __int64 __cdecl _fseeki64(void* str, __int64 offset, int whence)
{
	return fseek(str, (int)offset, whence);
}

EXPORT __int64 __cdecl _time64(__int64* _Time)
{
	time_t v;
	time_t t = time(&v);
	*_Time = v;
	return t;
}

EXPORT __int64 __cdecl _mktime64(void* tb)
{
	return mktime(tb);
}

EXPORT void* __cdecl _localtime64(__int64* _Time)
{
	time_t t = (time_t)*_Time;
	return localtime(&t);
}

EXPORT void* __cdecl _gmtime64(__int64* timp)
{
	time_t t = (time_t)*timp;
	return gmtime(&t);
}

EXPORT double __cdecl _difftime64(__int64 b, __int64 a)
{
	return difftime((time_t)b, (time_t)a);
}

/*
extern char* _strdup(char const* other);

EXPORT char* strdup(char const* other)
{
	return _strdup(other);
}*/